<?php

require './framework/class/class_core.php';
$lab = & core::instance();

$lab->init();

if($_FILES) {
	include libfile("class/image");
	include libfile("class/upload");
	$im = new image($_FILES['Filedata']['tmp_name']);
	$target = upload::get_target_dir('img', '', false).TIMESTAMP.".".strtolower(fileext($_POST['Filename']));
	if($_POST['advid'] == 1) {
		$im->thumb($target, 213, 1, 0);
	} else $im->thumb($target, 213, 0, 0);
	if($im->errorcode < 0) writelog('test', $im->errorcode);
	else exit(URL.'/data/'.$target);
}


//require ROOT.'./app/'.$mod.'/control/control_'.$fun.'.php';

//exit;


